!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c; }catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'',spinnerTpl:'
',errorTpl:'

{{ERROR}}

',btnTpl:{download:'',zoom:'',close:'',arrowLeft:'',arrowRight:'',smallBtn:''},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded.
Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden.
Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==n.style[t])return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),i)},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init()};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append('"),n("body").addClass("compensate-for-scrollbar")),i="",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||""}),o=n(a.translate(a,r.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+a.id).addClass(r.baseClass).data("FancyBox",a).appendTo(r.parentEl),a.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){a.$refs[t]=o.find(".fancybox-"+t)}),a.trigger("onInit"),a.activate(),a.jumpTo(a.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr("href"),l.type||l.src||(l.type="inline",l.src=e)):l={type:"html",src:e+""},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||"",!a&&r&&((s=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(a="video",l.opts.video.format||(l.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(a="iframe",l=n.extend(!0,l,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(a="inline")),a?l.type=a:o.trigger("objectNeedsType",l),l.contentType||(l.contentType=n.inArray(l.type,["html","inline","ajax"])>-1?"html":l.type),l.index=o.group.length,"auto"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,["html","inline","ajax"])>-1),"auto"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find("img:first"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find("img:first")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),"function"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),"function"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?"":l.opts.caption+""),"ajax"===l.type&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input,textarea,video,audio")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,a)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger("beforeShow",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass("fancybox-slide--current"),o)return s.opts.animationEffect&&e&&f.$refs.container.css("transition-duration",e+"ms"),f.$refs.container.addClass("fancybox-is-open").trigger("focus"),f.loadSlide(s),void f.preload("image");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>s.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===f.currPos&&f.complete()})})):e&&s.opts.transitionEffect&&(d="fancybox-animated fancybox-fx-"+s.opts.transitionEffect,r.$slide.addClass("fancybox-slide--"+(r.pos>s.pos?"next":"previous")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload("image")}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('
').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||"image"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),ap&&(s=i.top*c-(e*c-e),s>0&&(s=0),se-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass("fancybox-is-zoomable",i),n("[data-fancybox-zoom]").prop("disabled",!i),o?r.addClass("fancybox-can-pan"):i&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t1.5||Math.abs(a.height-s.height)>1.5)),s},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=n('
').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r=a||"x"===c.postfix&&c.value>=i){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,i=e.createElement("img"),a=n(i);t.$image=a.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),a.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger("load"):i.error&&a.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n('
').css(i.css).appendTo(a),a.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),a.on("refresh.fb",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find("body")}catch(t){}o&&o.length&&o.children().length&&(a.css("overflow","visible"),s.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css("width",r||"").css("max-width",""),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css("height",c||""),a.css("overflow","auto")),s.removeClass("fancybox-is-hidden")}})):o.afterLoad(t),e.attr("src",t.src),a.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("
").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("
").append(n.trim(e)).contents()),t.opts.filter&&(e=n("
").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("
"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("
").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('
').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass("fancybox-caption--separate",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",r||""))},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],i=s.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],i=t.opts[s.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),"zoom"===e&&(t.pos===s.currPos&&i&&"image"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,"auto"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(n.fancybox.stop(r),o="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,r.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(r),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,"fancybox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!d||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),i=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var i,a,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),i=i.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger("beforeClose",t)?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),i&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",i+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||a&&i&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity,"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0), n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.6",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=null;r.on("mousedown mouseup focus blur",".fancybox-button",function(e){switch(e.type){case"mousedown":t=n(this);break;case"mouseup":t=null;break;case"focusin":n(".fancybox-button").removeClass("fancybox-focus"),n(this).is(t)||n(this).is("[disabled]")||n(this).addClass("fancybox-focus");break;case"focusout":n(".fancybox-button").removeClass("fancybox-focus")}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;ee.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&aa?(t=t>0?0:t,t=ts?(e=e>0?0:e,e=e1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),rs.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:''},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('
').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;if(!n)return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:''},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,a=n.length;i1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('
').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('
').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.lefta.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:''},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}, tpl:''}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery); (function(factory){ if(typeof define==="function"&&define.amd){ define([ "jquery" ], factory); }else{ factory(jQuery); }}(function($){ $.ui=$.ui||{}; var version=$.ui.version="1.12.1"; var widgetUuid=0; var widgetSlice=Array.prototype.slice; $.cleanData=(function(orig){ return function(elems){ var events, elem, i; for(i=0;(elem=elems[ i ])!=null; i++){ try { events=$._data(elem, "events"); if(events&&events.remove){ $(elem).triggerHandler("remove"); }} catch(e){}} orig(elems); };})($.cleanData); $.widget=function(name, base, prototype){ var existingConstructor, constructor, basePrototype; var proxiedPrototype={}; var namespace=name.split(".")[ 0 ]; name=name.split(".")[ 1 ]; var fullName=namespace + "-" + name; if(!prototype){ prototype=base; base=$.Widget; } if($.isArray(prototype)){ prototype=$.extend.apply(null, [ {} ].concat(prototype)); } $.expr[ ":" ][ fullName.toLowerCase() ]=function(elem){ return !!$.data(elem, fullName); }; $[ namespace ]=$[ namespace ]||{}; existingConstructor=$[ namespace ][ name ]; constructor=$[ namespace ][ name ]=function(options, element){ if(!this._createWidget){ return new constructor(options, element); } if(arguments.length){ this._createWidget(options, element); }}; $.extend(constructor, existingConstructor, { version: prototype.version, _proto: $.extend({}, prototype), _childConstructors: [] }); basePrototype=new base(); basePrototype.options=$.widget.extend({}, basePrototype.options); $.each(prototype, function(prop, value){ if(!$.isFunction(value)){ proxiedPrototype[ prop ]=value; return; } proxiedPrototype[ prop ]=(function(){ function _super(){ return base.prototype[ prop ].apply(this, arguments); } function _superApply(args){ return base.prototype[ prop ].apply(this, args); } return function(){ var __super=this._super; var __superApply=this._superApply; var returnValue; this._super=_super; this._superApply=_superApply; returnValue=value.apply(this, arguments); this._super=__super; this._superApply=__superApply; return returnValue; };})(); }); constructor.prototype=$.widget.extend(basePrototype, { widgetEventPrefix: existingConstructor ?(basePrototype.widgetEventPrefix||name):name }, proxiedPrototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName }); if(existingConstructor){ $.each(existingConstructor._childConstructors, function(i, child){ var childPrototype=child.prototype; $.widget(childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto); }); delete existingConstructor._childConstructors; }else{ base._childConstructors.push(constructor); } $.widget.bridge(name, constructor); return constructor; }; $.widget.extend=function(target){ var input=widgetSlice.call(arguments, 1); var inputIndex=0; var inputLength=input.length; var key; var value; for(; inputIndex < inputLength; inputIndex++){ for(key in input[ inputIndex ]){ value=input[ inputIndex ][ key ]; if(input[ inputIndex ].hasOwnProperty(key)&&value!==undefined){ if($.isPlainObject(value)){ target[ key ]=$.isPlainObject(target[ key ]) ? $.widget.extend({}, target[ key ], value) : $.widget.extend({}, value); }else{ target[ key ]=value; }} }} return target; }; $.widget.bridge=function(name, object){ var fullName=object.prototype.widgetFullName||name; $.fn[ name ]=function(options){ var isMethodCall=typeof options==="string"; var args=widgetSlice.call(arguments, 1); var returnValue=this; if(isMethodCall){ if(!this.length&&options==="instance"){ returnValue=undefined; }else{ this.each(function(){ var methodValue; var instance=$.data(this, fullName); if(options==="instance"){ returnValue=instance; return false; } if(!instance){ return $.error("cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'"); } if(!$.isFunction(instance[ options ])||options.charAt(0)==="_"){ return $.error("no such method '" + options + "' for " + name + " widget instance"); } methodValue=instance[ options ].apply(instance, args); if(methodValue!==instance&&methodValue!==undefined){ returnValue=methodValue&&methodValue.jquery ? returnValue.pushStack(methodValue.get()) : methodValue; return false; }}); }}else{ if(args.length){ options=$.widget.extend.apply(null, [ options ].concat(args)); } this.each(function(){ var instance=$.data(this, fullName); if(instance){ instance.option(options||{}); if(instance._init){ instance._init(); }}else{ $.data(this, fullName, new object(options, this)); }}); } return returnValue; };}; $.Widget=function(){}; $.Widget._childConstructors=[]; $.Widget.prototype={ widgetName: "widget", widgetEventPrefix: "", defaultElement: "
", options: { classes: {}, disabled: false, create: null }, _createWidget: function(options, element){ element=$(element||this.defaultElement||this)[ 0 ]; this.element=$(element); this.uuid=widgetUuid++; this.eventNamespace="." + this.widgetName + this.uuid; this.bindings=$(); this.hoverable=$(); this.focusable=$(); this.classesElementLookup={}; if(element!==this){ $.data(element, this.widgetFullName, this); this._on(true, this.element, { remove: function(event){ if(event.target===element){ this.destroy(); }} }); this.document=$(element.style ? element.ownerDocument : element.document||element); this.window=$(this.document[ 0 ].defaultView||this.document[ 0 ].parentWindow); } this.options=$.widget.extend({}, this.options, this._getCreateOptions(), options); this._create(); if(this.options.disabled){ this._setOptionDisabled(this.options.disabled); } this._trigger("create", null, this._getCreateEventData()); this._init(); }, _getCreateOptions: function(){ return {};}, _getCreateEventData: $.noop, _create: $.noop, _init: $.noop, destroy: function(){ var that=this; this._destroy(); $.each(this.classesElementLookup, function(key, value){ that._removeClass(value, key); }); this.element .off(this.eventNamespace) .removeData(this.widgetFullName); this.widget() .off(this.eventNamespace) .removeAttr("aria-disabled"); this.bindings.off(this.eventNamespace); }, _destroy: $.noop, widget: function(){ return this.element; }, option: function(key, value){ var options=key; var parts; var curOption; var i; if(arguments.length===0){ return $.widget.extend({}, this.options); } if(typeof key==="string"){ options={}; parts=key.split("."); key=parts.shift(); if(parts.length){ curOption=options[ key ]=$.widget.extend({}, this.options[ key ]); for(i=0; i < parts.length - 1; i++){ curOption[ parts[ i ] ]=curOption[ parts[ i ] ]||{}; curOption=curOption[ parts[ i ] ]; } key=parts.pop(); if(arguments.length===1){ return curOption[ key ]===undefined ? null:curOption[ key ]; } curOption[ key ]=value; }else{ if(arguments.length===1){ return this.options[ key ]===undefined ? null:this.options[ key ]; } options[ key ]=value; }} this._setOptions(options); return this; }, _setOptions: function(options){ var key; for(key in options){ this._setOption(key, options[ key ]); } return this; }, _setOption: function(key, value){ if(key==="classes"){ this._setOptionClasses(value); } this.options[ key ]=value; if(key==="disabled"){ this._setOptionDisabled(value); } return this; }, _setOptionClasses: function(value){ var classKey, elements, currentElements; for(classKey in value){ currentElements=this.classesElementLookup[ classKey ]; if(value[ classKey ]===this.options.classes[ classKey ] || !currentElements || !currentElements.length){ continue; } elements=$(currentElements.get()); this._removeClass(currentElements, classKey); elements.addClass(this._classes({ element: elements, keys: classKey, classes: value, add: true })); }}, _setOptionDisabled: function(value){ this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!value); if(value){ this._removeClass(this.hoverable, null, "ui-state-hover"); this._removeClass(this.focusable, null, "ui-state-focus"); }}, enable: function(){ return this._setOptions({ disabled: false }); }, disable: function(){ return this._setOptions({ disabled: true }); }, _classes: function(options){ var full=[]; var that=this; options=$.extend({ element: this.element, classes: this.options.classes||{}}, options); function processClassString(classes, checkOption){ var current, i; for(i=0; i < classes.length; i++){ current=that.classesElementLookup[ classes[ i ] ]||$(); if(options.add){ current=$($.unique(current.get().concat(options.element.get()))); }else{ current=$(current.not(options.element).get()); } that.classesElementLookup[ classes[ i ] ]=current; full.push(classes[ i ]); if(checkOption&&options.classes[ classes[ i ] ]){ full.push(options.classes[ classes[ i ] ]); }} } this._on(options.element, { "remove": "_untrackClassesElement" }); if(options.keys){ processClassString(options.keys.match(/\S+/g)||[], true); } if(options.extra){ processClassString(options.extra.match(/\S+/g)||[]); } return full.join(" "); }, _untrackClassesElement: function(event){ var that=this; $.each(that.classesElementLookup, function(key, value){ if($.inArray(event.target, value)!==-1){ that.classesElementLookup[ key ]=$(value.not(event.target).get()); }}); }, _removeClass: function(element, keys, extra){ return this._toggleClass(element, keys, extra, false); }, _addClass: function(element, keys, extra){ return this._toggleClass(element, keys, extra, true); }, _toggleClass: function(element, keys, extra, add){ add=(typeof add==="boolean") ? add:extra; var shift=(typeof element==="string"||element===null), options={ extra: shift ? keys:extra, keys: shift ? element:keys, element: shift ? this.element:element, add: add }; options.element.toggleClass(this._classes(options), add); return this; }, _on: function(suppressDisabledCheck, element, handlers){ var delegateElement; var instance=this; if(typeof suppressDisabledCheck!=="boolean"){ handlers=element; element=suppressDisabledCheck; suppressDisabledCheck=false; } if(!handlers){ handlers=element; element=this.element; delegateElement=this.widget(); }else{ element=delegateElement=$(element); this.bindings=this.bindings.add(element); } $.each(handlers, function(event, handler){ function handlerProxy(){ if(!suppressDisabledCheck && (instance.options.disabled===true || $(this).hasClass("ui-state-disabled"))){ return; } return(typeof handler==="string" ? instance[ handler ]:handler) .apply(instance, arguments); } if(typeof handler!=="string"){ handlerProxy.guid=handler.guid = handler.guid||handlerProxy.guid||$.guid++; } var match=event.match(/^([\w:-]*)\s*(.*)$/); var eventName=match[ 1 ] + instance.eventNamespace; var selector=match[ 2 ]; if(selector){ delegateElement.on(eventName, selector, handlerProxy); }else{ element.on(eventName, handlerProxy); }}); }, _off: function(element, eventName){ eventName=(eventName||"").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; element.off(eventName).off(eventName); this.bindings=$(this.bindings.not(element).get()); this.focusable=$(this.focusable.not(element).get()); this.hoverable=$(this.hoverable.not(element).get()); }, _delay: function(handler, delay){ function handlerProxy(){ return(typeof handler==="string" ? instance[ handler ]:handler) .apply(instance, arguments); } var instance=this; return setTimeout(handlerProxy, delay||0); }, _hoverable: function(element){ this.hoverable=this.hoverable.add(element); this._on(element, { mouseenter: function(event){ this._addClass($(event.currentTarget), null, "ui-state-hover"); }, mouseleave: function(event){ this._removeClass($(event.currentTarget), null, "ui-state-hover"); }}); }, _focusable: function(element){ this.focusable=this.focusable.add(element); this._on(element, { focusin: function(event){ this._addClass($(event.currentTarget), null, "ui-state-focus"); }, focusout: function(event){ this._removeClass($(event.currentTarget), null, "ui-state-focus"); }}); }, _trigger: function(type, event, data){ var prop, orig; var callback=this.options[ type ]; data=data||{}; event=$.Event(event); event.type=(type===this.widgetEventPrefix ? type : this.widgetEventPrefix + type).toLowerCase(); event.target=this.element[ 0 ]; orig=event.originalEvent; if(orig){ for(prop in orig){ if(!(prop in event)){ event[ prop ]=orig[ prop ]; }} } this.element.trigger(event, data); return !($.isFunction(callback) && callback.apply(this.element[ 0 ], [ event ].concat(data))===false || event.isDefaultPrevented()); }}; $.each({ show: "fadeIn", hide: "fadeOut" }, function(method, defaultEffect){ $.Widget.prototype[ "_" + method ]=function(element, options, callback){ if(typeof options==="string"){ options={ effect: options };} var hasOptions; var effectName = !options ? method : options===true||typeof options==="number" ? defaultEffect : options.effect||defaultEffect; options=options||{}; if(typeof options==="number"){ options={ duration: options };} hasOptions = !$.isEmptyObject(options); options.complete=callback; if(options.delay){ element.delay(options.delay); } if(hasOptions&&$.effects&&$.effects.effect[ effectName ]){ element[ method ](options); }else if(effectName!==method&&element[ effectName ]){ element[ effectName ](options.duration, options.easing, callback); }else{ element.queue(function(next){ $(this)[ method ](); if(callback){ callback.call(element[ 0 ]); } next(); }); }};}); var widget=$.widget; (function(){ var cachedScrollbarWidth, max=Math.max, abs=Math.abs, rhorizontal=/left|center|right/, rvertical=/top|center|bottom/, roffset=/[\+\-]\d+(\.[\d]+)?%?/, rposition=/^\w+/, rpercent=/%$/, _position=$.fn.position; function getOffsets(offsets, width, height){ return [ parseFloat(offsets[ 0 ]) *(rpercent.test(offsets[ 0 ]) ? width / 100:1), parseFloat(offsets[ 1 ]) *(rpercent.test(offsets[ 1 ]) ? height / 100:1) ]; } function parseCss(element, property){ return parseInt($.css(element, property), 10)||0; } function getDimensions(elem){ var raw=elem[ 0 ]; if(raw.nodeType===9){ return { width: elem.width(), height: elem.height(), offset: { top: 0, left: 0 }};} if($.isWindow(raw)){ return { width: elem.width(), height: elem.height(), offset: { top: elem.scrollTop(), left: elem.scrollLeft() }};} if(raw.preventDefault){ return { width: 0, height: 0, offset: { top: raw.pageY, left: raw.pageX }};} return { width: elem.outerWidth(), height: elem.outerHeight(), offset: elem.offset() };} $.position={ scrollbarWidth: function(){ if(cachedScrollbarWidth!==undefined){ return cachedScrollbarWidth; } var w1, w2, div=$("
" + "
"), innerDiv=div.children()[ 0 ]; $("body").append(div); w1=innerDiv.offsetWidth; div.css("overflow", "scroll"); w2=innerDiv.offsetWidth; if(w1===w2){ w2=div[ 0 ].clientWidth; } div.remove(); return(cachedScrollbarWidth=w1 - w2); }, getScrollInfo: function(within){ var overflowX=within.isWindow||within.isDocument ? "" : within.element.css("overflow-x"), overflowY=within.isWindow||within.isDocument ? "" : within.element.css("overflow-y"), hasOverflowX=overflowX==="scroll" || (overflowX==="auto"&&within.width < within.element[ 0 ].scrollWidth), hasOverflowY=overflowY==="scroll" || (overflowY==="auto"&&within.height < within.element[ 0 ].scrollHeight); return { width: hasOverflowY ? $.position.scrollbarWidth():0, height: hasOverflowX ? $.position.scrollbarWidth():0 };}, getWithinInfo: function(element){ var withinElement=$(element||window), isWindow=$.isWindow(withinElement[ 0 ]), isDocument = !!withinElement[ 0 ]&&withinElement[ 0 ].nodeType===9, hasOffset = !isWindow&&!isDocument; return { element: withinElement, isWindow: isWindow, isDocument: isDocument, offset: hasOffset ? $(element).offset():{ left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), width: withinElement.outerWidth(), height: withinElement.outerHeight() };}}; $.fn.position=function(options){ if(!options||!options.of){ return _position.apply(this, arguments); } options=$.extend({}, options); var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, target=$(options.of), within=$.position.getWithinInfo(options.within), scrollInfo=$.position.getScrollInfo(within), collision=(options.collision||"flip").split(" "), offsets={}; dimensions=getDimensions(target); if(target[ 0 ].preventDefault){ options.at="left top"; } targetWidth=dimensions.width; targetHeight=dimensions.height; targetOffset=dimensions.offset; basePosition=$.extend({}, targetOffset); $.each([ "my", "at" ], function(){ var pos=(options[ this ]||"").split(" "), horizontalOffset, verticalOffset; if(pos.length===1){ pos=rhorizontal.test(pos[ 0 ]) ? pos.concat([ "center" ]) : rvertical.test(pos[ 0 ]) ? [ "center" ].concat(pos) : [ "center", "center" ]; } pos[ 0 ]=rhorizontal.test(pos[ 0 ]) ? pos[ 0 ]:"center"; pos[ 1 ]=rvertical.test(pos[ 1 ]) ? pos[ 1 ]:"center"; horizontalOffset=roffset.exec(pos[ 0 ]); verticalOffset=roffset.exec(pos[ 1 ]); offsets[ this ]=[ horizontalOffset ? horizontalOffset[ 0 ]:0, verticalOffset ? verticalOffset[ 0 ]:0 ]; options[ this ]=[ rposition.exec(pos[ 0 ])[ 0 ], rposition.exec(pos[ 1 ])[ 0 ] ]; }); if(collision.length===1){ collision[ 1 ]=collision[ 0 ]; } if(options.at[ 0 ]==="right"){ basePosition.left +=targetWidth; }else if(options.at[ 0 ]==="center"){ basePosition.left +=targetWidth / 2; } if(options.at[ 1 ]==="bottom"){ basePosition.top +=targetHeight; }else if(options.at[ 1 ]==="center"){ basePosition.top +=targetHeight / 2; } atOffset=getOffsets(offsets.at, targetWidth, targetHeight); basePosition.left +=atOffset[ 0 ]; basePosition.top +=atOffset[ 1 ]; return this.each(function(){ var collisionPosition, using, elem=$(this), elemWidth=elem.outerWidth(), elemHeight=elem.outerHeight(), marginLeft=parseCss(this, "marginLeft"), marginTop=parseCss(this, "marginTop"), collisionWidth=elemWidth + marginLeft + parseCss(this, "marginRight") + scrollInfo.width, collisionHeight=elemHeight + marginTop + parseCss(this, "marginBottom") + scrollInfo.height, position=$.extend({}, basePosition), myOffset=getOffsets(offsets.my, elem.outerWidth(), elem.outerHeight()); if(options.my[ 0 ]==="right"){ position.left -=elemWidth; }else if(options.my[ 0 ]==="center"){ position.left -=elemWidth / 2; } if(options.my[ 1 ]==="bottom"){ position.top -=elemHeight; }else if(options.my[ 1 ]==="center"){ position.top -=elemHeight / 2; } position.left +=myOffset[ 0 ]; position.top +=myOffset[ 1 ]; collisionPosition={ marginLeft: marginLeft, marginTop: marginTop }; $.each([ "left", "top" ], function(i, dir){ if($.ui.position[ collision[ i ] ]){ $.ui.position[ collision[ i ] ][ dir ](position, { targetWidth: targetWidth, targetHeight: targetHeight, elemWidth: elemWidth, elemHeight: elemHeight, collisionPosition: collisionPosition, collisionWidth: collisionWidth, collisionHeight: collisionHeight, offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], my: options.my, at: options.at, within: within, elem: elem }); }}); if(options.using){ using=function(props){ var left=targetOffset.left - position.left, right=left + targetWidth - elemWidth, top=targetOffset.top - position.top, bottom=top + targetHeight - elemHeight, feedback={ target: { element: target, left: targetOffset.left, top: targetOffset.top, width: targetWidth, height: targetHeight }, element: { element: elem, left: position.left, top: position.top, width: elemWidth, height: elemHeight }, horizontal: right < 0 ? "left":left > 0 ? "right":"center", vertical: bottom < 0 ? "top":top > 0 ? "bottom":"middle" }; if(targetWidth < elemWidth&&abs(left + right) < targetWidth){ feedback.horizontal="center"; } if(targetHeight < elemHeight&&abs(top + bottom) < targetHeight){ feedback.vertical="middle"; } if(max(abs(left), abs(right)) > max(abs(top), abs(bottom))){ feedback.important="horizontal"; }else{ feedback.important="vertical"; } options.using.call(this, props, feedback); };} elem.offset($.extend(position, { using: using })); }); }; $.ui.position={ fit: { left: function(position, data){ var within=data.within, withinOffset=within.isWindow ? within.scrollLeft:within.offset.left, outerWidth=within.width, collisionPosLeft=position.left - data.collisionPosition.marginLeft, overLeft=withinOffset - collisionPosLeft, overRight=collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, newOverRight; if(data.collisionWidth > outerWidth){ if(overLeft > 0&&overRight <=0){ newOverRight=position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; position.left +=overLeft - newOverRight; }else if(overRight > 0&&overLeft <=0){ position.left=withinOffset; }else{ if(overLeft > overRight){ position.left=withinOffset + outerWidth - data.collisionWidth; }else{ position.left=withinOffset; }} }else if(overLeft > 0){ position.left +=overLeft; }else if(overRight > 0){ position.left -=overRight; }else{ position.left=max(position.left - collisionPosLeft, position.left); }}, top: function(position, data){ var within=data.within, withinOffset=within.isWindow ? within.scrollTop:within.offset.top, outerHeight=data.within.height, collisionPosTop=position.top - data.collisionPosition.marginTop, overTop=withinOffset - collisionPosTop, overBottom=collisionPosTop + data.collisionHeight - outerHeight - withinOffset, newOverBottom; if(data.collisionHeight > outerHeight){ if(overTop > 0&&overBottom <=0){ newOverBottom=position.top + overTop + data.collisionHeight - outerHeight - withinOffset; position.top +=overTop - newOverBottom; }else if(overBottom > 0&&overTop <=0){ position.top=withinOffset; }else{ if(overTop > overBottom){ position.top=withinOffset + outerHeight - data.collisionHeight; }else{ position.top=withinOffset; }} }else if(overTop > 0){ position.top +=overTop; }else if(overBottom > 0){ position.top -=overBottom; }else{ position.top=max(position.top - collisionPosTop, position.top); }} }, flip: { left: function(position, data){ var within=data.within, withinOffset=within.offset.left + within.scrollLeft, outerWidth=within.width, offsetLeft=within.isWindow ? within.scrollLeft:within.offset.left, collisionPosLeft=position.left - data.collisionPosition.marginLeft, overLeft=collisionPosLeft - offsetLeft, overRight=collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, myOffset=data.my[ 0 ]==="left" ? -data.elemWidth : data.my[ 0 ]==="right" ? data.elemWidth : 0, atOffset=data.at[ 0 ]==="left" ? data.targetWidth : data.at[ 0 ]==="right" ? -data.targetWidth : 0, offset=-2 * data.offset[ 0 ], newOverRight, newOverLeft; if(overLeft < 0){ newOverRight=position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; if(newOverRight < 0||newOverRight < abs(overLeft)){ position.left +=myOffset + atOffset + offset; }}else if(overRight > 0){ newOverLeft=position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; if(newOverLeft > 0||abs(newOverLeft) < overRight){ position.left +=myOffset + atOffset + offset; }} }, top: function(position, data){ var within=data.within, withinOffset=within.offset.top + within.scrollTop, outerHeight=within.height, offsetTop=within.isWindow ? within.scrollTop:within.offset.top, collisionPosTop=position.top - data.collisionPosition.marginTop, overTop=collisionPosTop - offsetTop, overBottom=collisionPosTop + data.collisionHeight - outerHeight - offsetTop, top=data.my[ 1 ]==="top", myOffset=top ? -data.elemHeight : data.my[ 1 ]==="bottom" ? data.elemHeight : 0, atOffset=data.at[ 1 ]==="top" ? data.targetHeight : data.at[ 1 ]==="bottom" ? -data.targetHeight : 0, offset=-2 * data.offset[ 1 ], newOverTop, newOverBottom; if(overTop < 0){ newOverBottom=position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; if(newOverBottom < 0||newOverBottom < abs(overTop)){ position.top +=myOffset + atOffset + offset; }}else if(overBottom > 0){ newOverTop=position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; if(newOverTop > 0||abs(newOverTop) < overBottom){ position.top +=myOffset + atOffset + offset; }} }}, flipfit: { left: function(){ $.ui.position.flip.left.apply(this, arguments); $.ui.position.fit.left.apply(this, arguments); }, top: function(){ $.ui.position.flip.top.apply(this, arguments); $.ui.position.fit.top.apply(this, arguments); }} };})(); var position=$.ui.position; var data=$.extend($.expr[ ":" ], { data: $.expr.createPseudo ? $.expr.createPseudo(function(dataName){ return function(elem){ return !!$.data(elem, dataName); };}) : function(elem, i, match){ return !!$.data(elem, match[ 3 ]); }}); var disableSelection=$.fn.extend({ disableSelection:(function(){ var eventType="onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function(){ return this.on(eventType + ".ui-disableSelection", function(event){ event.preventDefault(); }); };})(), enableSelection: function(){ return this.off(".ui-disableSelection"); }}); var dataSpace="ui-effects-", dataSpaceStyle="ui-effects-style", dataSpaceAnimated="ui-effects-animated", jQuery=$; $.effects={ effect: {}}; (function(jQuery, undefined){ var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor " + "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", rplusequals=/^([\-+])=\s*(\d+\.?\d*)/, stringParsers=[ { re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(execResult){ return [ execResult[ 1 ], execResult[ 2 ], execResult[ 3 ], execResult[ 4 ] ]; }}, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(execResult){ return [ execResult[ 1 ] * 2.55, execResult[ 2 ] * 2.55, execResult[ 3 ] * 2.55, execResult[ 4 ] ]; }}, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function(execResult){ return [ parseInt(execResult[ 1 ], 16), parseInt(execResult[ 2 ], 16), parseInt(execResult[ 3 ], 16) ]; }}, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function(execResult){ return [ parseInt(execResult[ 1 ] + execResult[ 1 ], 16), parseInt(execResult[ 2 ] + execResult[ 2 ], 16), parseInt(execResult[ 3 ] + execResult[ 3 ], 16) ]; }}, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function(execResult){ return [ execResult[ 1 ], execResult[ 2 ] / 100, execResult[ 3 ] / 100, execResult[ 4 ] ]; }} ], color=jQuery.Color=function(color, green, blue, alpha){ return new jQuery.Color.fn.parse(color, green, blue, alpha); }, spaces={ rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" }} }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" }} }}, propTypes={ "byte": { floor: true, max: 255 }, "percent": { max: 1 }, "degrees": { mod: 360, floor: true }}, support=color.support={}, supportElem=jQuery("

")[ 0 ], colors, each=jQuery.each; supportElem.style.cssText="background-color:rgba(1,1,1,.5)"; support.rgba=supportElem.style.backgroundColor.indexOf("rgba") > -1; each(spaces, function(spaceName, space){ space.cache="_" + spaceName; space.props.alpha={ idx: 3, type: "percent", def: 1 };}); function clamp(value, prop, allowEmpty){ var type=propTypes[ prop.type ]||{}; if(value==null){ return(allowEmpty||!prop.def) ? null:prop.def; } value=type.floor ? ~~value:parseFloat(value); if(isNaN(value)){ return prop.def; } if(type.mod){ return(value + type.mod) % type.mod; } return 0 > value ? 0:type.max < value ? type.max:value; } function stringParse(string){ var inst=color(), rgba=inst._rgba=[]; string=string.toLowerCase(); each(stringParsers, function(i, parser){ var parsed, match=parser.re.exec(string), values=match&&parser.parse(match), spaceName=parser.space||"rgba"; if(values){ parsed=inst[ spaceName ](values); inst[ spaces[ spaceName ].cache ]=parsed[ spaces[ spaceName ].cache ]; rgba=inst._rgba=parsed._rgba; return false; }}); if(rgba.length){ if(rgba.join()==="0,0,0,0"){ jQuery.extend(rgba, colors.transparent); } return inst; } return colors[ string ]; } color.fn=jQuery.extend(color.prototype, { parse: function(red, green, blue, alpha){ if(red===undefined){ this._rgba=[ null, null, null, null ]; return this; } if(red.jquery||red.nodeType){ red=jQuery(red).css(green); green=undefined; } var inst=this, type=jQuery.type(red), rgba=this._rgba=[]; if(green!==undefined){ red=[ red, green, blue, alpha ]; type="array"; } if(type==="string"){ return this.parse(stringParse(red)||colors._default); } if(type==="array"){ each(spaces.rgba.props, function(key, prop){ rgba[ prop.idx ]=clamp(red[ prop.idx ], prop); }); return this; } if(type==="object"){ if(red instanceof color){ each(spaces, function(spaceName, space){ if(red[ space.cache ]){ inst[ space.cache ]=red[ space.cache ].slice(); }}); }else{ each(spaces, function(spaceName, space){ var cache=space.cache; each(space.props, function(key, prop){ if(!inst[ cache ]&&space.to){ if(key==="alpha"||red[ key ]==null){ return; } inst[ cache ]=space.to(inst._rgba); } inst[ cache ][ prop.idx ]=clamp(red[ key ], prop, true); }); if(inst[ cache ] && jQuery.inArray(null, inst[ cache ].slice(0, 3)) < 0){ inst[ cache ][ 3 ]=1; if(space.from){ inst._rgba=space.from(inst[ cache ]); }} }); } return this; }}, is: function(compare){ var is=color(compare), same=true, inst=this; each(spaces, function(_, space){ var localCache, isCache=is[ space.cache ]; if(isCache){ localCache=inst[ space.cache ]||space.to&&space.to(inst._rgba)||[]; each(space.props, function(_, prop){ if(isCache[ prop.idx ]!=null){ same=(isCache[ prop.idx ]===localCache[ prop.idx ]); return same; }}); } return same; }); return same; }, _space: function(){ var used=[], inst=this; each(spaces, function(spaceName, space){ if(inst[ space.cache ]){ used.push(spaceName); }}); return used.pop(); }, transition: function(other, distance){ var end=color(other), spaceName=end._space(), space=spaces[ spaceName ], startColor=this.alpha()===0 ? color("transparent"):this, start=startColor[ space.cache ]||space.to(startColor._rgba), result=start.slice(); end=end[ space.cache ]; each(space.props, function(key, prop){ var index=prop.idx, startValue=start[ index ], endValue=end[ index ], type=propTypes[ prop.type ]||{}; if(endValue===null){ return; } if(startValue===null){ result[ index ]=endValue; }else{ if(type.mod){ if(endValue - startValue > type.mod / 2){ startValue +=type.mod; }else if(startValue - endValue > type.mod / 2){ startValue -=type.mod; }} result[ index ]=clamp(( endValue - startValue) * distance + startValue, prop); }}); return this[ spaceName ](result); }, blend: function(opaque){ if(this._rgba[ 3 ]===1){ return this; } var rgb=this._rgba.slice(), a=rgb.pop(), blend=color(opaque)._rgba; return color(jQuery.map(rgb, function(v, i){ return(1 - a) * blend[ i ] + a * v; })); }, toRgbaString: function(){ var prefix="rgba(", rgba=jQuery.map(this._rgba, function(v, i){ return v==null ?(i > 2 ? 1:0):v; }); if(rgba[ 3 ]===1){ rgba.pop(); prefix="rgb("; } return prefix + rgba.join() + ")"; }, toHslaString: function(){ var prefix="hsla(", hsla=jQuery.map(this.hsla(), function(v, i){ if(v==null){ v=i > 2 ? 1:0; } if(i&&i < 3){ v=Math.round(v * 100) + "%"; } return v; }); if(hsla[ 3 ]===1){ hsla.pop(); prefix="hsl("; } return prefix + hsla.join() + ")"; }, toHexString: function(includeAlpha){ var rgba=this._rgba.slice(), alpha=rgba.pop(); if(includeAlpha){ rgba.push(~~(alpha * 255)); } return "#" + jQuery.map(rgba, function(v){ v=(v||0).toString(16); return v.length===1 ? "0" + v:v; }).join(""); }, toString: function(){ return this._rgba[ 3 ]===0 ? "transparent":this.toRgbaString(); }}); color.fn.parse.prototype=color.fn; function hue2rgb(p, q, h){ h=(h + 1) % 1; if(h * 6 < 1){ return p +(q - p) * h * 6; } if(h * 2 < 1){ return q; } if(h * 3 < 2){ return p +(q - p) *(( 2 / 3) - h) * 6; } return p; } spaces.hsla.to=function(rgba){ if(rgba[ 0 ]==null||rgba[ 1 ]==null||rgba[ 2 ]==null){ return [ null, null, null, rgba[ 3 ] ]; } var r=rgba[ 0 ] / 255, g=rgba[ 1 ] / 255, b=rgba[ 2 ] / 255, a=rgba[ 3 ], max=Math.max(r, g, b), min=Math.min(r, g, b), diff=max - min, add=max + min, l=add * 0.5, h, s; if(min===max){ h=0; }else if(r===max){ h=(60 *(g - b) / diff) + 360; }else if(g===max){ h=(60 *(b - r) / diff) + 120; }else{ h=(60 *(r - g) / diff) + 240; } if(diff===0){ s=0; }else if(l <=0.5){ s=diff / add; }else{ s=diff /(2 - add); } return [ Math.round(h) % 360, s, l, a==null ? 1:a ]; }; spaces.hsla.from=function(hsla){ if(hsla[ 0 ]==null||hsla[ 1 ]==null||hsla[ 2 ]==null){ return [ null, null, null, hsla[ 3 ] ]; } var h=hsla[ 0 ] / 360, s=hsla[ 1 ], l=hsla[ 2 ], a=hsla[ 3 ], q=l <=0.5 ? l *(1 + s):l + s - l * s, p=2 * l - q; return [ Math.round(hue2rgb(p, q, h +(1 / 3)) * 255), Math.round(hue2rgb(p, q, h) * 255), Math.round(hue2rgb(p, q, h -(1 / 3)) * 255), a ]; }; each(spaces, function(spaceName, space){ var props=space.props, cache=space.cache, to=space.to, from=space.from; color.fn[ spaceName ]=function(value){ if(to&&!this[ cache ]){ this[ cache ]=to(this._rgba); } if(value===undefined){ return this[ cache ].slice(); } var ret, type=jQuery.type(value), arr=(type==="array"||type==="object") ? value:arguments, local=this[ cache ].slice(); each(props, function(key, prop){ var val=arr[ type==="object" ? key:prop.idx ]; if(val==null){ val=local[ prop.idx ]; } local[ prop.idx ]=clamp(val, prop); }); if(from){ ret=color(from(local)); ret[ cache ]=local; return ret; }else{ return color(local); }}; each(props, function(key, prop){ if(color.fn[ key ]){ return; } color.fn[ key ]=function(value){ var vtype=jQuery.type(value), fn=(key==="alpha" ?(this._hsla ? "hsla":"rgba"):spaceName), local=this[ fn ](), cur=local[ prop.idx ], match; if(vtype==="undefined"){ return cur; } if(vtype==="function"){ value=value.call(this, cur); vtype=jQuery.type(value); } if(value==null&&prop.empty){ return this; } if(vtype==="string"){ match=rplusequals.exec(value); if(match){ value=cur + parseFloat(match[ 2 ]) *(match[ 1 ]==="+" ? 1:-1); }} local[ prop.idx ]=value; return this[ fn ](local); };}); }); color.hook=function(hook){ var hooks=hook.split(" "); each(hooks, function(i, hook){ jQuery.cssHooks[ hook ]={ set: function(elem, value){ var parsed, curElem, backgroundColor=""; if(value!=="transparent"&&(jQuery.type(value)!=="string" || (parsed=stringParse(value)))){ value=color(parsed||value); if(!support.rgba&&value._rgba[ 3 ]!==1){ curElem=hook==="backgroundColor" ? elem.parentNode:elem; while ( (backgroundColor===""||backgroundColor==="transparent") && curElem&&curElem.style ){ try { backgroundColor=jQuery.css(curElem, "backgroundColor"); curElem=curElem.parentNode; } catch(e){ }} value=value.blend(backgroundColor&&backgroundColor!=="transparent" ? backgroundColor : "_default"); } value=value.toRgbaString(); } try { elem.style[ hook ]=value; } catch(e){ }} }; jQuery.fx.step[ hook ]=function(fx){ if(!fx.colorInit){ fx.start=color(fx.elem, hook); fx.end=color(fx.end); fx.colorInit=true; } jQuery.cssHooks[ hook ].set(fx.elem, fx.start.transition(fx.end, fx.pos)); };}); }; color.hook(stepHooks); jQuery.cssHooks.borderColor={ expand: function(value){ var expanded={}; each([ "Top", "Right", "Bottom", "Left" ], function(i, part){ expanded[ "border" + part + "Color" ]=value; }); return expanded; }}; colors=jQuery.Color.names={ aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [ null, null, null, 0 ], _default: "#ffffff" };})(jQuery); (function(){ var classAnimationActions=[ "add", "remove", "toggle" ], shorthandStyles={ border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; $.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function(_, prop){ $.fx.step[ prop ]=function(fx){ if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){ jQuery.style(fx.elem, prop, fx.end); fx.setAttr=true; }};} ); function getElementStyles(elem){ var key, len, style=elem.ownerDocument.defaultView ? elem.ownerDocument.defaultView.getComputedStyle(elem, null) : elem.currentStyle, styles={}; if(style&&style.length&&style[ 0 ]&&style[ style[ 0 ] ]){ len=style.length; while(len--){ key=style[ len ]; if(typeof style[ key ]==="string"){ styles[ $.camelCase(key) ]=style[ key ]; }} }else{ for(key in style){ if(typeof style[ key ]==="string"){ styles[ key ]=style[ key ]; }} } return styles; } function styleDifference(oldStyle, newStyle){ var diff={}, name, value; for(name in newStyle){ value=newStyle[ name ]; if(oldStyle[ name ]!==value){ if(!shorthandStyles[ name ]){ if($.fx.step[ name ]||!isNaN(parseFloat(value))){ diff[ name ]=value; }} }} return diff; } if(!$.fn.addBack){ $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };} $.effects.animateClass=function(value, duration, easing, callback){ var o=$.speed(duration, easing, callback); return this.queue(function(){ var animated=$(this), baseClass=animated.attr("class")||"", applyClassChange, allAnimations=o.children ? animated.find("*").addBack():animated; allAnimations=allAnimations.map(function(){ var el=$(this); return { el: el, start: getElementStyles(this) };}); applyClassChange=function(){ $.each(classAnimationActions, function(i, action){ if(value[ action ]){ animated[ action + "Class" ](value[ action ]); }}); }; applyClassChange(); allAnimations=allAnimations.map(function(){ this.end=getElementStyles(this.el[ 0 ]); this.diff=styleDifference(this.start, this.end); return this; }); animated.attr("class", baseClass); allAnimations=allAnimations.map(function(){ var styleInfo=this, dfd=$.Deferred(), opts=$.extend({}, o, { queue: false, complete: function(){ dfd.resolve(styleInfo); }}); this.el.animate(this.diff, opts); return dfd.promise(); }); $.when.apply($, allAnimations.get()).done(function(){ applyClassChange(); $.each(arguments, function(){ var el=this.el; $.each(this.diff, function(key){ el.css(key, ""); }); }); o.complete.call(animated[ 0 ]); }); }); }; $.fn.extend({ addClass:(function(orig){ return function(classNames, speed, easing, callback){ return speed ? $.effects.animateClass.call(this, { add: classNames }, speed, easing, callback) : orig.apply(this, arguments); };})($.fn.addClass), removeClass:(function(orig){ return function(classNames, speed, easing, callback){ return arguments.length > 1 ? $.effects.animateClass.call(this, { remove: classNames }, speed, easing, callback) : orig.apply(this, arguments); };})($.fn.removeClass), toggleClass:(function(orig){ return function(classNames, force, speed, easing, callback){ if(typeof force==="boolean"||force===undefined){ if(!speed){ return orig.apply(this, arguments); }else{ return $.effects.animateClass.call(this, (force ? { add: classNames }:{ remove: classNames }), speed, easing, callback); }}else{ return $.effects.animateClass.call(this, { toggle: classNames }, force, speed, easing); }};})($.fn.toggleClass), switchClass: function(remove, add, speed, easing, callback){ return $.effects.animateClass.call(this, { add: add, remove: remove }, speed, easing, callback); }}); })(); (function(){ if($.expr&&$.expr.filters&&$.expr.filters.animated){ $.expr.filters.animated=(function(orig){ return function(elem){ return !!$(elem).data(dataSpaceAnimated)||orig(elem); };})($.expr.filters.animated); } if($.uiBackCompat!==false){ $.extend($.effects, { save: function(element, set){ var i=0, length=set.length; for(; i < length; i++){ if(set[ i ]!==null){ element.data(dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ]); }} }, restore: function(element, set){ var val, i=0, length=set.length; for(; i < length; i++){ if(set[ i ]!==null){ val=element.data(dataSpace + set[ i ]); element.css(set[ i ], val); }} }, setMode: function(el, mode){ if(mode==="toggle"){ mode=el.is(":hidden") ? "show":"hide"; } return mode; }, createWrapper: function(element){ if(element.parent().is(".ui-effects-wrapper")){ return element.parent(); } var props={ width: element.outerWidth(true), height: element.outerHeight(true), "float": element.css("float") }, wrapper=$("

") .addClass("ui-effects-wrapper") .css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), size={ width: element.width(), height: element.height() }, active=document.activeElement; try { active.id; } catch(e){ active=document.body; } element.wrap(wrapper); if(element[ 0 ]===active||$.contains(element[ 0 ], active)){ $(active).trigger("focus"); } wrapper=element.parent(); if(element.css("position")==="static"){ wrapper.css({ position: "relative" }); element.css({ position: "relative" }); }else{ $.extend(props, { position: element.css("position"), zIndex: element.css("z-index") }); $.each([ "top", "left", "bottom", "right" ], function(i, pos){ props[ pos ]=element.css(pos); if(isNaN(parseInt(props[ pos ], 10))){ props[ pos ]="auto"; }}); element.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" }); } element.css(size); return wrapper.css(props).show(); }, removeWrapper: function(element){ var active=document.activeElement; if(element.parent().is(".ui-effects-wrapper")){ element.parent().replaceWith(element); if(element[ 0 ]===active||$.contains(element[ 0 ], active)){ $(active).trigger("focus"); }} return element; }}); } $.extend($.effects, { version: "1.12.1", define: function(name, mode, effect){ if(!effect){ effect=mode; mode="effect"; } $.effects.effect[ name ]=effect; $.effects.effect[ name ].mode=mode; return effect; }, scaledDimensions: function(element, percent, direction){ if(percent===0){ return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };} var x=direction!=="horizontal" ?(( percent||100) / 100):1, y=direction!=="vertical" ?(( percent||100) / 100):1; return { height: element.height() * y, width: element.width() * x, outerHeight: element.outerHeight() * y, outerWidth: element.outerWidth() * x };}, clipToBox: function(animation){ return { width: animation.clip.right - animation.clip.left, height: animation.clip.bottom - animation.clip.top, left: animation.clip.left, top: animation.clip.top };}, unshift: function(element, queueLength, count){ var queue=element.queue(); if(queueLength > 1){ queue.splice.apply(queue, [ 1, 0 ].concat(queue.splice(queueLength, count))); } element.dequeue(); }, saveStyle: function(element){ element.data(dataSpaceStyle, element[ 0 ].style.cssText); }, restoreStyle: function(element){ element[ 0 ].style.cssText=element.data(dataSpaceStyle)||""; element.removeData(dataSpaceStyle); }, mode: function(element, mode){ var hidden=element.is(":hidden"); if(mode==="toggle"){ mode=hidden ? "show":"hide"; } if(hidden ? mode==="hide":mode==="show"){ mode="none"; } return mode; }, getBaseline: function(origin, original){ var y, x; switch(origin[ 0 ]){ case "top": y=0; break; case "middle": y=0.5; break; case "bottom": y=1; break; default: y=origin[ 0 ] / original.height; } switch(origin[ 1 ]){ case "left": x=0; break; case "center": x=0.5; break; case "right": x=1; break; default: x=origin[ 1 ] / original.width; } return { x: x, y: y };}, createPlaceholder: function(element){ var placeholder, cssPosition=element.css("position"), position=element.position(); element.css({ marginTop: element.css("marginTop"), marginBottom: element.css("marginBottom"), marginLeft: element.css("marginLeft"), marginRight: element.css("marginRight") }) .outerWidth(element.outerWidth()) .outerHeight(element.outerHeight()); if(/^(static|relative)/.test(cssPosition)){ cssPosition="absolute"; placeholder=$("<" + element[ 0 ].nodeName + ">").insertAfter(element).css({ display: /^(inline|ruby)/.test(element.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: element.css("marginTop"), marginBottom: element.css("marginBottom"), marginLeft: element.css("marginLeft"), marginRight: element.css("marginRight"), "float": element.css("float") }) .outerWidth(element.outerWidth()) .outerHeight(element.outerHeight()) .addClass("ui-effects-placeholder"); element.data(dataSpace + "placeholder", placeholder); } element.css({ position: cssPosition, left: position.left, top: position.top }); return placeholder; }, removePlaceholder: function(element){ var dataKey=dataSpace + "placeholder", placeholder=element.data(dataKey); if(placeholder){ placeholder.remove(); element.removeData(dataKey); }}, cleanUp: function(element){ $.effects.restoreStyle(element); $.effects.removePlaceholder(element); }, setTransition: function(element, list, factor, value){ value=value||{}; $.each(list, function(i, x){ var unit=element.cssUnit(x); if(unit[ 0 ] > 0){ value[ x ]=unit[ 0 ] * factor + unit[ 1 ]; }}); return value; }}); function _normalizeArguments(effect, options, speed, callback){ if($.isPlainObject(effect)){ options=effect; effect=effect.effect; } effect={ effect: effect }; if(options==null){ options={};} if($.isFunction(options)){ callback=options; speed=null; options={};} if(typeof options==="number"||$.fx.speeds[ options ]){ callback=speed; speed=options; options={};} if($.isFunction(speed)){ callback=speed; speed=null; } if(options){ $.extend(effect, options); } speed=speed||options.duration; effect.duration=$.fx.off ? 0 : typeof speed==="number" ? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default; effect.complete=callback||options.complete; return effect; } function standardAnimationOption(option){ if(!option||typeof option==="number"||$.fx.speeds[ option ]){ return true; } if(typeof option==="string"&&!$.effects.effect[ option ]){ return true; } if($.isFunction(option)){ return true; } if(typeof option==="object"&&!option.effect){ return true; } return false; } $.fn.extend({ effect: function(){ var args=_normalizeArguments.apply(this, arguments), effectMethod=$.effects.effect[ args.effect ], defaultMode=effectMethod.mode, queue=args.queue, queueName=queue||"fx", complete=args.complete, mode=args.mode, modes=[], prefilter=function(next){ var el=$(this), normalizedMode=$.effects.mode(el, mode)||defaultMode; el.data(dataSpaceAnimated, true); modes.push(normalizedMode); if(defaultMode&&(normalizedMode==="show" || (normalizedMode===defaultMode&&normalizedMode==="hide"))){ el.show(); } if(!defaultMode||normalizedMode!=="none"){ $.effects.saveStyle(el); } if($.isFunction(next)){ next(); }}; if($.fx.off||!effectMethod){ if(mode){ return this[ mode ](args.duration, complete); }else{ return this.each(function(){ if(complete){ complete.call(this); }}); }} function run(next){ var elem=$(this); function cleanup(){ elem.removeData(dataSpaceAnimated); $.effects.cleanUp(elem); if(args.mode==="hide"){ elem.hide(); } done(); } function done(){ if($.isFunction(complete)){ complete.call(elem[ 0 ]); } if($.isFunction(next)){ next(); }} args.mode=modes.shift(); if($.uiBackCompat!==false&&!defaultMode){ if(elem.is(":hidden") ? mode==="hide":mode==="show"){ elem[ mode ](); done(); }else{ effectMethod.call(elem[ 0 ], args, done); }}else{ if(args.mode==="none"){ elem[ mode ](); done(); }else{ effectMethod.call(elem[ 0 ], args, cleanup); }} } return queue===false ? this.each(prefilter).each(run) : this.queue(queueName, prefilter).queue(queueName, run); }, show:(function(orig){ return function(option){ if(standardAnimationOption(option)){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="show"; return this.effect.call(this, args); }};})($.fn.show), hide:(function(orig){ return function(option){ if(standardAnimationOption(option)){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="hide"; return this.effect.call(this, args); }};})($.fn.hide), toggle:(function(orig){ return function(option){ if(standardAnimationOption(option)||typeof option==="boolean"){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="toggle"; return this.effect.call(this, args); }};})($.fn.toggle), cssUnit: function(key){ var style=this.css(key), val=[]; $.each([ "em", "px", "%", "pt" ], function(i, unit){ if(style.indexOf(unit) > 0){ val=[ parseFloat(style), unit ]; }}); return val; }, cssClip: function(clipObj){ if(clipObj){ return this.css("clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + clipObj.bottom + "px " + clipObj.left + "px)"); } return parseClip(this.css("clip"), this); }, transfer: function(options, done){ var element=$(this), target=$(options.to), targetFixed=target.css("position")==="fixed", body=$("body"), fixTop=targetFixed ? body.scrollTop():0, fixLeft=targetFixed ? body.scrollLeft():0, endPosition=target.offset(), animation={ top: endPosition.top - fixTop, left: endPosition.left - fixLeft, height: target.innerHeight(), width: target.innerWidth() }, startPosition=element.offset(), transfer=$("
") .appendTo("body") .addClass(options.className) .css({ top: startPosition.top - fixTop, left: startPosition.left - fixLeft, height: element.innerHeight(), width: element.innerWidth(), position: targetFixed ? "fixed":"absolute" }) .animate(animation, options.duration, options.easing, function(){ transfer.remove(); if($.isFunction(done)){ done(); }}); }}); function parseClip(str, element){ var outerWidth=element.outerWidth(), outerHeight=element.outerHeight(), clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, values=clipRegex.exec(str)||[ "", 0, outerWidth, outerHeight, 0 ]; return { top: parseFloat(values[ 1 ])||0, right: values[ 2 ]==="auto" ? outerWidth:parseFloat(values[ 2 ]), bottom: values[ 3 ]==="auto" ? outerHeight:parseFloat(values[ 3 ]), left: parseFloat(values[ 4 ])||0 };} $.fx.step.clip=function(fx){ if(!fx.clipInit){ fx.start=$(fx.elem).cssClip(); if(typeof fx.end==="string"){ fx.end=parseClip(fx.end, fx.elem); } fx.clipInit=true; } $(fx.elem).cssClip({ top: fx.pos *(fx.end.top - fx.start.top) + fx.start.top, right: fx.pos *(fx.end.right - fx.start.right) + fx.start.right, bottom: fx.pos *(fx.end.bottom - fx.start.bottom) + fx.start.bottom, left: fx.pos *(fx.end.left - fx.start.left) + fx.start.left }); };})(); (function(){ var baseEasings={}; $.each([ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function(i, name){ baseEasings[ name ]=function(p){ return Math.pow(p, i + 2); };}); $.extend(baseEasings, { Sine: function(p){ return 1 - Math.cos(p * Math.PI / 2); }, Circ: function(p){ return 1 - Math.sqrt(1 - p * p); }, Elastic: function(p){ return p===0||p===1 ? p : -Math.pow(2, 8 *(p - 1)) * Math.sin(((p - 1) * 80 - 7.5) * Math.PI / 15); }, Back: function(p){ return p * p *(3 * p - 2); }, Bounce: function(p){ var pow2, bounce=4; while(p <(( pow2=Math.pow(2, --bounce)) - 1) / 11){} return 1 / Math.pow(4, 3 - bounce) - 7.5625 * Math.pow(( pow2 * 3 - 2) / 22 - p, 2); }}); $.each(baseEasings, function(name, easeIn){ $.easing[ "easeIn" + name ]=easeIn; $.easing[ "easeOut" + name ]=function(p){ return 1 - easeIn(1 - p); }; $.easing[ "easeInOut" + name ]=function(p){ return p < 0.5 ? easeIn(p * 2) / 2 : 1 - easeIn(p * -2 + 2) / 2; };}); })(); var effect=$.effects; var effectsEffectBlind=$.effects.define("blind", "hide", function(options, done){ var map={ up: [ "bottom", "top" ], vertical: [ "bottom", "top" ], down: [ "top", "bottom" ], left: [ "right", "left" ], horizontal: [ "right", "left" ], right: [ "left", "right" ] }, element=$(this), direction=options.direction||"up", start=element.cssClip(), animate={ clip: $.extend({}, start) }, placeholder=$.effects.createPlaceholder(element); animate.clip[ map[ direction ][ 0 ] ]=animate.clip[ map[ direction ][ 1 ] ]; if(options.mode==="show"){ element.cssClip(animate.clip); if(placeholder){ placeholder.css($.effects.clipToBox(animate)); } animate.clip=start; } if(placeholder){ placeholder.animate($.effects.clipToBox(animate), options.duration, options.easing); } element.animate(animate, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); var effectsEffectBounce=$.effects.define("bounce", function(options, done){ var upAnim, downAnim, refValue, element=$(this), mode=options.mode, hide=mode==="hide", show=mode==="show", direction=options.direction||"up", distance=options.distance, times=options.times||5, anims=times * 2 +(show||hide ? 1:0), speed=options.duration / anims, easing=options.easing, ref=(direction==="up"||direction==="down") ? "top":"left", motion=(direction==="up"||direction==="left"), i=0, queuelen=element.queue().length; $.effects.createPlaceholder(element); refValue=element.css(ref); if(!distance){ distance=element[ ref==="top" ? "outerHeight":"outerWidth" ]() / 3; } if(show){ downAnim={ opacity: 1 }; downAnim[ ref ]=refValue; element .css("opacity", 0) .css(ref, motion ? -distance * 2:distance * 2) .animate(downAnim, speed, easing); } if(hide){ distance=distance / Math.pow(2, times - 1); } downAnim={}; downAnim[ ref ]=refValue; for(; i < times; i++){ upAnim={}; upAnim[ ref ]=(motion ? "-=":"+=") + distance; element .animate(upAnim, speed, easing) .animate(downAnim, speed, easing); distance=hide ? distance * 2:distance / 2; } if(hide){ upAnim={ opacity: 0 }; upAnim[ ref ]=(motion ? "-=":"+=") + distance; element.animate(upAnim, speed, easing); } element.queue(done); $.effects.unshift(element, queuelen, anims + 1); }); var effectsEffectClip=$.effects.define("clip", "hide", function(options, done){ var start, animate={}, element=$(this), direction=options.direction||"vertical", both=direction==="both", horizontal=both||direction==="horizontal", vertical=both||direction==="vertical"; start=element.cssClip(); animate.clip={ top: vertical ?(start.bottom - start.top) / 2:start.top, right: horizontal ?(start.right - start.left) / 2:start.right, bottom: vertical ?(start.bottom - start.top) / 2:start.bottom, left: horizontal ?(start.right - start.left) / 2:start.left }; $.effects.createPlaceholder(element); if(options.mode==="show"){ element.cssClip(animate.clip); animate.clip=start; } element.animate(animate, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); var effectsEffectDrop=$.effects.define("drop", "hide", function(options, done){ var distance, element=$(this), mode=options.mode, show=mode==="show", direction=options.direction||"left", ref=(direction==="up"||direction==="down") ? "top":"left", motion=(direction==="up"||direction==="left") ? "-=":"+=", oppositeMotion=(motion==="+=") ? "-=":"+=", animation={ opacity: 0 }; $.effects.createPlaceholder(element); distance=options.distance || element[ ref==="top" ? "outerHeight":"outerWidth" ](true) / 2; animation[ ref ]=motion + distance; if(show){ element.css(animation); animation[ ref ]=oppositeMotion + distance; animation.opacity=1; } element.animate(animation, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); var effectsEffectExplode=$.effects.define("explode", "hide", function(options, done){ var i, j, left, top, mx, my, rows=options.pieces ? Math.round(Math.sqrt(options.pieces)):3, cells=rows, element=$(this), mode=options.mode, show=mode==="show", offset=element.show().css("visibility", "hidden").offset(), width=Math.ceil(element.outerWidth() / cells), height=Math.ceil(element.outerHeight() / rows), pieces=[]; function childComplete(){ pieces.push(this); if(pieces.length===rows * cells){ animComplete(); }} for(i=0; i < rows; i++){ top=offset.top + i * height; my=i -(rows - 1) / 2; for(j=0; j < cells; j++){ left=offset.left + j * width; mx=j -(cells - 1) / 2; element .clone() .appendTo("body") .wrap("
") .css({ position: "absolute", visibility: "visible", left: -j * width, top: -i * height }) .parent() .addClass("ui-effects-explode") .css({ position: "absolute", overflow: "hidden", width: width, height: height, left: left +(show ? mx * width:0), top: top +(show ? my * height:0), opacity: show ? 0:1 }) .animate({ left: left +(show ? 0:mx * width), top: top +(show ? 0:my * height), opacity: show ? 1:0 }, options.duration||500, options.easing, childComplete); }} function animComplete(){ element.css({ visibility: "visible" }); $(pieces).remove(); done(); }}); var effectsEffectFade=$.effects.define("fade", "toggle", function(options, done){ var show=options.mode==="show"; $(this) .css("opacity", show ? 0:1) .animate({ opacity: show ? 1:0 }, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); var effectsEffectFold=$.effects.define("fold", "hide", function(options, done){ var element=$(this), mode=options.mode, show=mode==="show", hide=mode==="hide", size=options.size||15, percent=/([0-9]+)%/.exec(size), horizFirst = !!options.horizFirst, ref=horizFirst ? [ "right", "bottom" ]:[ "bottom", "right" ], duration=options.duration / 2, placeholder=$.effects.createPlaceholder(element), start=element.cssClip(), animation1={ clip: $.extend({}, start) }, animation2={ clip: $.extend({}, start) }, distance=[ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], queuelen=element.queue().length; if(percent){ size=parseInt(percent[ 1 ], 10) / 100 * distance[ hide ? 0:1 ]; } animation1.clip[ ref[ 0 ] ]=size; animation2.clip[ ref[ 0 ] ]=size; animation2.clip[ ref[ 1 ] ]=0; if(show){ element.cssClip(animation2.clip); if(placeholder){ placeholder.css($.effects.clipToBox(animation2)); } animation2.clip=start; } element .queue(function(next){ if(placeholder){ placeholder .animate($.effects.clipToBox(animation1), duration, options.easing) .animate($.effects.clipToBox(animation2), duration, options.easing); } next(); }) .animate(animation1, duration, options.easing) .animate(animation2, duration, options.easing) .queue(done); $.effects.unshift(element, queuelen, 4); }); var effectsEffectHighlight=$.effects.define("highlight", "show", function(options, done){ var element=$(this), animation={ backgroundColor: element.css("backgroundColor") }; if(options.mode==="hide"){ animation.opacity=0; } $.effects.saveStyle(element); element .css({ backgroundImage: "none", backgroundColor: options.color||"#ffff99" }) .animate(animation, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); var effectsEffectSize=$.effects.define("size", function(options, done){ var baseline, factor, temp, element=$(this), cProps=[ "fontSize" ], vProps=[ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], hProps=[ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], mode=options.mode, restore=mode!=="effect", scale=options.scale||"both", origin=options.origin||[ "middle", "center" ], position=element.css("position"), pos=element.position(), original=$.effects.scaledDimensions(element), from=options.from||original, to=options.to||$.effects.scaledDimensions(element, 0); $.effects.createPlaceholder(element); if(mode==="show"){ temp=from; from=to; to=temp; } factor={ from: { y: from.height / original.height, x: from.width / original.width }, to: { y: to.height / original.height, x: to.width / original.width }}; if(scale==="box"||scale==="both"){ if(factor.from.y!==factor.to.y){ from=$.effects.setTransition(element, vProps, factor.from.y, from); to=$.effects.setTransition(element, vProps, factor.to.y, to); } if(factor.from.x!==factor.to.x){ from=$.effects.setTransition(element, hProps, factor.from.x, from); to=$.effects.setTransition(element, hProps, factor.to.x, to); }} if(scale==="content"||scale==="both"){ if(factor.from.y!==factor.to.y){ from=$.effects.setTransition(element, cProps, factor.from.y, from); to=$.effects.setTransition(element, cProps, factor.to.y, to); }} if(origin){ baseline=$.effects.getBaseline(origin, original); from.top=(original.outerHeight - from.outerHeight) * baseline.y + pos.top; from.left=(original.outerWidth - from.outerWidth) * baseline.x + pos.left; to.top=(original.outerHeight - to.outerHeight) * baseline.y + pos.top; to.left=(original.outerWidth - to.outerWidth) * baseline.x + pos.left; } element.css(from); if(scale==="content"||scale==="both"){ vProps=vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); hProps=hProps.concat([ "marginLeft", "marginRight" ]); element.find("*[width]").each(function(){ var child=$(this), childOriginal=$.effects.scaledDimensions(child), childFrom={ height: childOriginal.height * factor.from.y, width: childOriginal.width * factor.from.x, outerHeight: childOriginal.outerHeight * factor.from.y, outerWidth: childOriginal.outerWidth * factor.from.x }, childTo={ height: childOriginal.height * factor.to.y, width: childOriginal.width * factor.to.x, outerHeight: childOriginal.height * factor.to.y, outerWidth: childOriginal.width * factor.to.x }; if(factor.from.y!==factor.to.y){ childFrom=$.effects.setTransition(child, vProps, factor.from.y, childFrom); childTo=$.effects.setTransition(child, vProps, factor.to.y, childTo); } if(factor.from.x!==factor.to.x){ childFrom=$.effects.setTransition(child, hProps, factor.from.x, childFrom); childTo=$.effects.setTransition(child, hProps, factor.to.x, childTo); } if(restore){ $.effects.saveStyle(child); } child.css(childFrom); child.animate(childTo, options.duration, options.easing, function(){ if(restore){ $.effects.restoreStyle(child); }}); }); } element.animate(to, { queue: false, duration: options.duration, easing: options.easing, complete: function(){ var offset=element.offset(); if(to.opacity===0){ element.css("opacity", from.opacity); } if(!restore){ element .css("position", position==="static" ? "relative":position) .offset(offset); $.effects.saveStyle(element); } done(); }}); }); var effectsEffectScale=$.effects.define("scale", function(options, done){ var el=$(this), mode=options.mode, percent=parseInt(options.percent, 10) || (parseInt(options.percent, 10)===0 ? 0:(mode!=="effect" ? 0:100)), newOptions=$.extend(true, { from: $.effects.scaledDimensions(el), to: $.effects.scaledDimensions(el, percent, options.direction||"both"), origin: options.origin||[ "middle", "center" ] }, options); if(options.fade){ newOptions.from.opacity=1; newOptions.to.opacity=0; } $.effects.effect.size.call(this, newOptions, done); }); var effectsEffectPuff=$.effects.define("puff", "hide", function(options, done){ var newOptions=$.extend(true, {}, options, { fade: true, percent: parseInt(options.percent, 10)||150 }); $.effects.effect.scale.call(this, newOptions, done); }); var effectsEffectPulsate=$.effects.define("pulsate", "show", function(options, done){ var element=$(this), mode=options.mode, show=mode==="show", hide=mode==="hide", showhide=show||hide, anims=(( options.times||5) * 2) +(showhide ? 1:0), duration=options.duration / anims, animateTo=0, i=1, queuelen=element.queue().length; if(show||!element.is(":visible")){ element.css("opacity", 0).show(); animateTo=1; } for(; i < anims; i++){ element.animate({ opacity: animateTo }, duration, options.easing); animateTo=1 - animateTo; } element.animate({ opacity: animateTo }, duration, options.easing); element.queue(done); $.effects.unshift(element, queuelen, anims + 1); }); var effectsEffectShake=$.effects.define("shake", function(options, done){ var i=1, element=$(this), direction=options.direction||"left", distance=options.distance||20, times=options.times||3, anims=times * 2 + 1, speed=Math.round(options.duration / anims), ref=(direction==="up"||direction==="down") ? "top":"left", positiveMotion=(direction==="up"||direction==="left"), animation={}, animation1={}, animation2={}, queuelen=element.queue().length; $.effects.createPlaceholder(element); animation[ ref ]=(positiveMotion ? "-=":"+=") + distance; animation1[ ref ]=(positiveMotion ? "+=":"-=") + distance * 2; animation2[ ref ]=(positiveMotion ? "-=":"+=") + distance * 2; element.animate(animation, speed, options.easing); for(; i < times; i++){ element .animate(animation1, speed, options.easing) .animate(animation2, speed, options.easing); } element .animate(animation1, speed, options.easing) .animate(animation, speed / 2, options.easing) .queue(done); $.effects.unshift(element, queuelen, anims + 1); }); var effectsEffectSlide=$.effects.define("slide", "show", function(options, done){ var startClip, startRef, element=$(this), map={ up: [ "bottom", "top" ], down: [ "top", "bottom" ], left: [ "right", "left" ], right: [ "left", "right" ] }, mode=options.mode, direction=options.direction||"left", ref=(direction==="up"||direction==="down") ? "top":"left", positiveMotion=(direction==="up"||direction==="left"), distance=options.distance || element[ ref==="top" ? "outerHeight":"outerWidth" ](true), animation={}; $.effects.createPlaceholder(element); startClip=element.cssClip(); startRef=element.position()[ ref ]; animation[ ref ]=(positiveMotion ? -1:1) * distance + startRef; animation.clip=element.cssClip(); animation.clip[ map[ direction ][ 1 ] ]=animation.clip[ map[ direction ][ 0 ] ]; if(mode==="show"){ element.cssClip(animation.clip); element.css(ref, animation[ ref ]); animation.clip=startClip; animation[ ref ]=startRef; } element.animate(animation, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); var effect; if($.uiBackCompat!==false){ effect=$.effects.define("transfer", function(options, done){ $(this).transfer(options, done); }); } var effectsEffectTransfer=effect; $.ui.focusable=function(element, hasTabindex){ var map, mapName, img, focusableIfVisible, fieldset, nodeName=element.nodeName.toLowerCase(); if("area"===nodeName){ map=element.parentNode; mapName=map.name; if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){ return false; } img=$("img[usemap='#" + mapName + "']"); return img.length > 0&&img.is(":visible"); } if(/^(input|select|textarea|button|object)$/.test(nodeName)){ focusableIfVisible = !element.disabled; if(focusableIfVisible){ fieldset=$(element).closest("fieldset")[ 0 ]; if(fieldset){ focusableIfVisible = !fieldset.disabled; }} }else if("a"===nodeName){ focusableIfVisible=element.href||hasTabindex; }else{ focusableIfVisible=hasTabindex; } return focusableIfVisible&&$(element).is(":visible")&&visible($(element)); }; function visible(element){ var visibility=element.css("visibility"); while(visibility==="inherit"){ element=element.parent(); visibility=element.css("visibility"); } return visibility!=="hidden"; } $.extend($.expr[ ":" ], { focusable: function(element){ return $.ui.focusable(element, $.attr(element, "tabindex")!=null); }}); var focusable=$.ui.focusable; var form=$.fn.form=function(){ return typeof this[ 0 ].form==="string" ? this.closest("form"):$(this[ 0 ].form); }; var formResetMixin=$.ui.formResetMixin={ _formResetHandler: function(){ var form=$(this); setTimeout(function(){ var instances=form.data("ui-form-reset-instances"); $.each(instances, function(){ this.refresh(); }); }); }, _bindFormResetHandler: function(){ this.form=this.element.form(); if(!this.form.length){ return; } var instances=this.form.data("ui-form-reset-instances")||[]; if(!instances.length){ this.form.on("reset.ui-form-reset", this._formResetHandler); } instances.push(this); this.form.data("ui-form-reset-instances", instances); }, _unbindFormResetHandler: function(){ if(!this.form.length){ return; } var instances=this.form.data("ui-form-reset-instances"); instances.splice($.inArray(this, instances), 1); if(instances.length){ this.form.data("ui-form-reset-instances", instances); }else{ this.form .removeData("ui-form-reset-instances") .off("reset.ui-form-reset"); }} }; if($.fn.jquery.substring(0, 3)==="1.7"){ $.each([ "Width", "Height" ], function(i, name){ var side=name==="Width" ? [ "Left", "Right" ]:[ "Top", "Bottom" ], type=name.toLowerCase(), orig={ innerWidth: $.fn.innerWidth, innerHeight: $.fn.innerHeight, outerWidth: $.fn.outerWidth, outerHeight: $.fn.outerHeight }; function reduce(elem, size, border, margin){ $.each(side, function(){ size -=parseFloat($.css(elem, "padding" + this))||0; if(border){ size -=parseFloat($.css(elem, "border" + this + "Width"))||0; } if(margin){ size -=parseFloat($.css(elem, "margin" + this))||0; }}); return size; } $.fn[ "inner" + name ]=function(size){ if(size===undefined){ return orig[ "inner" + name ].call(this); } return this.each(function(){ $(this).css(type, reduce(this, size) + "px"); }); }; $.fn[ "outer" + name ]=function(size, margin){ if(typeof size!=="number"){ return orig[ "outer" + name ].call(this, size); } return this.each(function(){ $(this).css(type, reduce(this, size, true, margin) + "px"); }); };}); $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };} ; var keycode=$.ui.keyCode={ BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }; var escapeSelector=$.ui.escapeSelector=(function(){ var selectorEscape=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; return function(selector){ return selector.replace(selectorEscape, "\\$1"); };})(); var labels=$.fn.labels=function(){ var ancestor, selector, id, labels, ancestors; if(this[ 0 ].labels&&this[ 0 ].labels.length){ return this.pushStack(this[ 0 ].labels); } labels=this.eq(0).parents("label"); id=this.attr("id"); if(id){ ancestor=this.eq(0).parents().last(); ancestors=ancestor.add(ancestor.length ? ancestor.siblings():this.siblings()); selector="label[for='" + $.ui.escapeSelector(id) + "']"; labels=labels.add(ancestors.find(selector).addBack(selector)); } return this.pushStack(labels); }; var scrollParent=$.fn.scrollParent=function(includeHidden){ var position=this.css("position"), excludeStaticParent=position==="absolute", overflowRegex=includeHidden ? /(auto|scroll|hidden)/:/(auto|scroll)/, scrollParent=this.parents().filter(function(){ var parent=$(this); if(excludeStaticParent&&parent.css("position")==="static"){ return false; } return overflowRegex.test(parent.css("overflow") + parent.css("overflow-y") + parent.css("overflow-x")); }).eq(0); return position==="fixed"||!scrollParent.length ? $(this[ 0 ].ownerDocument||document) : scrollParent; }; var tabbable=$.extend($.expr[ ":" ], { tabbable: function(element){ var tabIndex=$.attr(element, "tabindex"), hasTabindex=tabIndex!=null; return(!hasTabindex||tabIndex >=0)&&$.ui.focusable(element, hasTabindex); }}); var uniqueId=$.fn.extend({ uniqueId:(function(){ var uuid=0; return function(){ return this.each(function(){ if(!this.id){ this.id="ui-id-" + ( ++uuid); }}); };})(), removeUniqueId: function(){ return this.each(function(){ if(/^ui-id-\d+$/.test(this.id)){ $(this).removeAttr("id"); }}); }}); var widgetsAccordion=$.widget("ui.accordion", { version: "1.12.1", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: false, event: "click", header: "> li > :first-child, > :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function(){ var options=this.options; this.prevShow=this.prevHide=$(); this._addClass("ui-accordion", "ui-widget ui-helper-reset"); this.element.attr("role", "tablist"); if(!options.collapsible&&(options.active===false||options.active==null)){ options.active=0; } this._processPanels(); if(options.active < 0){ options.active +=this.headers.length; } this._refresh(); }, _getCreateEventData: function(){ return { header: this.active, panel: !this.active.length ? $():this.active.next() };}, _createIcons: function(){ var icon, children, icons=this.options.icons; if(icons){ icon=$(""); this._addClass(icon, "ui-accordion-header-icon", "ui-icon " + icons.header); icon.prependTo(this.headers); children=this.active.children(".ui-accordion-header-icon"); this._removeClass(children, icons.header) ._addClass(children, null, icons.activeHeader) ._addClass(this.headers, "ui-accordion-icons"); }}, _destroyIcons: function(){ this._removeClass(this.headers, "ui-accordion-icons"); this.headers.children(".ui-accordion-header-icon").remove(); }, _destroy: function(){ var contents; this.element.removeAttr("role"); this.headers .removeAttr("role aria-expanded aria-selected aria-controls tabIndex") .removeUniqueId(); this._destroyIcons(); contents=this.headers.next() .css("display", "") .removeAttr("role aria-hidden aria-labelledby") .removeUniqueId(); if(this.options.heightStyle!=="content"){ contents.css("height", ""); }}, _setOption: function(key, value){ if(key==="active"){ this._activate(value); return; } if(key==="event"){ if(this.options.event){ this._off(this.headers, this.options.event); } this._setupEvents(value); } this._super(key, value); if(key==="collapsible"&&!value&&this.options.active===false){ this._activate(0); } if(key==="icons"){ this._destroyIcons(); if(value){ this._createIcons(); }} }, _setOptionDisabled: function(value){ this._super(value); this.element.attr("aria-disabled", value); this._toggleClass(null, "ui-state-disabled", !!value); this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!value); }, _keydown: function(event){ if(event.altKey||event.ctrlKey){ return; } var keyCode=$.ui.keyCode, length=this.headers.length, currentIndex=this.headers.index(event.target), toFocus=false; switch(event.keyCode){ case keyCode.RIGHT: case keyCode.DOWN: toFocus=this.headers[(currentIndex + 1) % length ]; break; case keyCode.LEFT: case keyCode.UP: toFocus=this.headers[(currentIndex - 1 + length) % length ]; break; case keyCode.SPACE: case keyCode.ENTER: this._eventHandler(event); break; case keyCode.HOME: toFocus=this.headers[ 0 ]; break; case keyCode.END: toFocus=this.headers[ length - 1 ]; break; } if(toFocus){ $(event.target).attr("tabIndex", -1); $(toFocus).attr("tabIndex", 0); $(toFocus).trigger("focus"); event.preventDefault(); }}, _panelKeyDown: function(event){ if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){ $(event.currentTarget).prev().trigger("focus"); }}, refresh: function(){ var options=this.options; this._processPanels(); if(( options.active===false&&options.collapsible===true) || !this.headers.length){ options.active=false; this.active=$(); }else if(options.active===false){ this._activate(0); }else if(this.active.length&&!$.contains(this.element[ 0 ], this.active[ 0 ])){ if(this.headers.length===this.headers.find(".ui-state-disabled").length){ options.active=false; this.active=$(); }else{ this._activate(Math.max(0, options.active - 1)); }}else{ options.active=this.headers.index(this.active); } this._destroyIcons(); this._refresh(); }, _processPanels: function(){ var prevHeaders=this.headers, prevPanels=this.panels; this.headers=this.element.find(this.options.header); this._addClass(this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default"); this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(); this._addClass(this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content"); if(prevPanels){ this._off(prevHeaders.not(this.headers)); this._off(prevPanels.not(this.panels)); }}, _refresh: function(){ var maxHeight, options=this.options, heightStyle=options.heightStyle, parent=this.element.parent(); this.active=this._findActive(options.active); this._addClass(this.active, "ui-accordion-header-active", "ui-state-active") ._removeClass(this.active, "ui-accordion-header-collapsed"); this._addClass(this.active.next(), "ui-accordion-content-active"); this.active.next().show(); this.headers .attr("role", "tab") .each(function(){ var header=$(this), headerId=header.uniqueId().attr("id"), panel=header.next(), panelId=panel.uniqueId().attr("id"); header.attr("aria-controls", panelId); panel.attr("aria-labelledby", headerId); }) .next() .attr("role", "tabpanel"); this.headers .not(this.active) .attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }) .next() .attr({ "aria-hidden": "true" }) .hide(); if(!this.active.length){ this.headers.eq(0).attr("tabIndex", 0); }else{ this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) .next() .attr({ "aria-hidden": "false" }); } this._createIcons(); this._setupEvents(options.event); if(heightStyle==="fill"){ maxHeight=parent.height(); this.element.siblings(":visible").each(function(){ var elem=$(this), position=elem.css("position"); if(position==="absolute"||position==="fixed"){ return; } maxHeight -=elem.outerHeight(true); }); this.headers.each(function(){ maxHeight -=$(this).outerHeight(true); }); this.headers.next() .each(function(){ $(this).height(Math.max(0, maxHeight - $(this).innerHeight() + $(this).height())); }) .css("overflow", "auto"); }else if(heightStyle==="auto"){ maxHeight=0; this.headers.next() .each(function(){ var isVisible=$(this).is(":visible"); if(!isVisible){ $(this).show(); } maxHeight=Math.max(maxHeight, $(this).css("height", "").height()); if(!isVisible){ $(this).hide(); }}) .height(maxHeight); }}, _activate: function(index){ var active=this._findActive(index)[ 0 ]; if(active===this.active[ 0 ]){ return; } active=active||this.active[ 0 ]; this._eventHandler({ target: active, currentTarget: active, preventDefault: $.noop }); }, _findActive: function(selector){ return typeof selector==="number" ? this.headers.eq(selector):$(); }, _setupEvents: function(event){ var events={ keydown: "_keydown" }; if(event){ $.each(event.split(" "), function(index, eventName){ events[ eventName ]="_eventHandler"; }); } this._off(this.headers.add(this.headers.next())); this._on(this.headers, events); this._on(this.headers.next(), { keydown: "_panelKeyDown" }); this._hoverable(this.headers); this._focusable(this.headers); }, _eventHandler: function(event){ var activeChildren, clickedChildren, options=this.options, active=this.active, clicked=$(event.currentTarget), clickedIsActive=clicked[ 0 ]===active[ 0 ], collapsing=clickedIsActive&&options.collapsible, toShow=collapsing ? $():clicked.next(), toHide=active.next(), eventData={ oldHeader: active, oldPanel: toHide, newHeader: collapsing ? $():clicked, newPanel: toShow }; event.preventDefault(); if((clickedIsActive&&!options.collapsible) || (this._trigger("beforeActivate", event, eventData)===false)){ return; } options.active=collapsing ? false:this.headers.index(clicked); this.active=clickedIsActive ? $():clicked; this._toggle(eventData); this._removeClass(active, "ui-accordion-header-active", "ui-state-active"); if(options.icons){ activeChildren=active.children(".ui-accordion-header-icon"); this._removeClass(activeChildren, null, options.icons.activeHeader) ._addClass(activeChildren, null, options.icons.header); } if(!clickedIsActive){ this._removeClass(clicked, "ui-accordion-header-collapsed") ._addClass(clicked, "ui-accordion-header-active", "ui-state-active"); if(options.icons){ clickedChildren=clicked.children(".ui-accordion-header-icon"); this._removeClass(clickedChildren, null, options.icons.header) ._addClass(clickedChildren, null, options.icons.activeHeader); } this._addClass(clicked.next(), "ui-accordion-content-active"); }}, _toggle: function(data){ var toShow=data.newPanel, toHide=this.prevShow.length ? this.prevShow:data.oldPanel; this.prevShow.add(this.prevHide).stop(true, true); this.prevShow=toShow; this.prevHide=toHide; if(this.options.animate){ this._animate(toShow, toHide, data); }else{ toHide.hide(); toShow.show(); this._toggleComplete(data); } toHide.attr({ "aria-hidden": "true" }); toHide.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }); if(toShow.length&&toHide.length){ toHide.prev().attr({ "tabIndex": -1, "aria-expanded": "false" }); }else if(toShow.length){ this.headers.filter(function(){ return parseInt($(this).attr("tabIndex"), 10)===0; }) .attr("tabIndex", -1); } toShow .attr("aria-hidden", "false") .prev() .attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }); }, _animate: function(toShow, toHide, data){ var total, easing, duration, that=this, adjust=0, boxSizing=toShow.css("box-sizing"), down=toShow.length && (!toHide.length||(toShow.index() < toHide.index())), animate=this.options.animate||{}, options=down&&animate.down||animate, complete=function(){ that._toggleComplete(data); }; if(typeof options==="number"){ duration=options; } if(typeof options==="string"){ easing=options; } easing=easing||options.easing||animate.easing; duration=duration||options.duration||animate.duration; if(!toHide.length){ return toShow.animate(this.showProps, duration, easing, complete); } if(!toShow.length){ return toHide.animate(this.hideProps, duration, easing, complete); } total=toShow.show().outerHeight(); toHide.animate(this.hideProps, { duration: duration, easing: easing, step: function(now, fx){ fx.now=Math.round(now); }}); toShow .hide() .animate(this.showProps, { duration: duration, easing: easing, complete: complete, step: function(now, fx){ fx.now=Math.round(now); if(fx.prop!=="height"){ if(boxSizing==="content-box"){ adjust +=fx.now; }}else if(that.options.heightStyle!=="content"){ fx.now=Math.round(total - toHide.outerHeight() - adjust); adjust=0; }} }); }, _toggleComplete: function(data){ var toHide=data.oldPanel, prev=toHide.prev(); this._removeClass(toHide, "ui-accordion-content-active"); this._removeClass(prev, "ui-accordion-header-active") ._addClass(prev, "ui-accordion-header-collapsed"); if(toHide.length){ toHide.parent()[ 0 ].className=toHide.parent()[ 0 ].className; } this._trigger("activate", null, data); }}); var safeActiveElement=$.ui.safeActiveElement=function(document){ var activeElement; try { activeElement=document.activeElement; } catch(error){ activeElement=document.body; } if(!activeElement){ activeElement=document.body; } if(!activeElement.nodeName){ activeElement=document.body; } return activeElement; }; var widgetsMenu=$.widget("ui.menu", { version: "1.12.1", defaultElement: "